package com.hxc.controller;

import com.hxc.entity.PageBean;
import com.hxc.entity.Result;
import com.hxc.service.OperateLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 操作日志查询
 * */
@RestController
public class OperaLogController {
    @Autowired
    private OperateLogService operateLogService;
    @GetMapping("/log/page")
    public Result getLogPage(Integer page, Integer pageSize) {
        if (pageSize == null) {
            pageSize = 10;
        }
        if (page == null) {
            page = 1;
        }
        PageBean pageBean = operateLogService.getLogPage(page,pageSize);
        return Result.success(pageBean);
    }
}
